﻿<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>商品分类</title>
<link href="__PUBLIC__/admin/css/xc.min.css" rel="stylesheet" type="text/css" />
<link href="__PUBLIC__/admin/css/xc.admin.css" rel="stylesheet" type="text/css" />
<link href="__PUBLIC__/lib/iconfont/iconfont.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="__PUBLIC__/admin/js/jquery.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/admin/js/xc.js"></script> 
<script type="text/javascript" src="__PUBLIC__/admin/js/xc.admin.js"></script>
<script type="text/javascript" src="__PUBLIC__/admin/js/common-1.0.js"></script>
<script type="text/javascript" src="__PUBLIC__/lib/layer/layer.js"></script>
</head>
<body>
<nav class="breadcrumb">
  <i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 商品管理 <span class="c-gray en">&gt;</span> 商品分类 
  <a class="btn btn-success radius r mr-20 btn-shua" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a>
</nav>
<div class="pd-20">
  <div class="mt-0">
    <div class="cl pd-5 bg-1 bk-gray mb-10">
      <a class="btn btn-primary radius r" onclick="layer_show('添加分类','__MODULE__/Goods/roomAddEdit','600','450')" href="javascript:;"><i class="Hui-iconfont">&#xe600;</i> 添加分类</a>
    </div>
    <table class="table table-border table-bordered table-bg table-hover table-sort">
      <thead>
        <tr class="text-c">
          <th width="60">编号</th>
          <th width="100">分类名称</th>
         <!-- <th width="350">涉及品牌</th>-->
<!--          <th width="70">排序</th>-->
<!--          <th width="70">是否显示</th>-->
<!--          <th width="70">是否推荐</th>-->
          <th width="100">操作</th>
        </tr>
      </thead>
      <tbody id="treet1">
        <volist name="rolist" id="vo">
        <tr class="text-c">
          <td>{$i}</td>
          <td class="text-l">{$vo.ro_room}</td>
          <!--<td class="text-l"><volist name='vo.brname' id='bvo'>&nbsp;{$bvo.br_name}&nbsp;,</volist></td>-->
<!--          <td class="text-c">{$vo.ca_sort}</td>-->
<!--          <td><img width="20" src="__PUBLIC__/admin/images/<if condition='($vo[ca_show] eq 1)'>y.png<else />n.png</if>" onclick="changeTableVal('category','ca_id={$vo.ca_id}','ca_show',this)"/></td>-->
<!--          <td><img width="20" src="__PUBLIC__/admin/images/<if condition='($vo[ca_recommend] eq 1)'>y.png<else />n.png</if>" onclick="changeTableVal('category','ca_id={$vo.ca_id}','ca_recommend',this)"/></td>-->
          <td class="f-14 product-brand-manage">
            <a style="text-decoration:none" onClick="layer_show('编辑分类','__MODULE__/Goods/roomAddEdit?rid={$vo.ro_rid}','600','400')" href="javascript:;" title="编辑">编辑</a> |
            <a style="text-decoration:none" class="ml-5" onClick="cate_del(this,'{$vo.ro_rid}')" href="javascript:;" title="删除">删除</a>
          </td>
        </tr>
        </volist>
      </tbody>
    </table>
</div>
</div>
<script type="text/javascript">
/*删除*/
function cate_del(obj, id) {
layer.confirm('确认要删除分类吗？', function(index) {
	$.ajax({
		type : 'post',
		url : '__MODULE__/Goods/cateDel',
		data : {id:id},
		dataType : 'json',
		success : function(res){
			if(res.status == 1){
				$(obj).parents("tr").remove();
				layer.msg(res.msg, {icon: 1,time: 1000});
			}else{
				layer.msg(res.msg, {icon: 2});
			}
		},
		error : function(XMLHttpRequest, textStatus, errorThrown) {
			layer.alert('网络失败，请刷新页面后重试',{icon:2});
		}
	})
});
}
</script>
</body>
</html>